import 'dart:async';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_book/data/temp_data.dart';
import '../../book/animation_util/book_animation_page.dart';
import 'dart:ui' as ui;
import 'package:flutter_book/util/extensions/string_extensions.dart';

class BookReadPageSimulation extends StatefulWidget {
  BookReadPageSimulation();
  @override
  _BookReadPageSimulationState createState() => _BookReadPageSimulationState();
}

class _BookReadPageSimulationState extends State<BookReadPageSimulation> with SingleTickerProviderStateMixin  {

  List<ui.Image> listImage=[];

  GlobalKey canvasKey=GlobalKey();

  late BookAnimationPageController _controller;

  @override
  void initState() {
    super.initState();
    _controller=BookAnimationPageController(this,canvasKey);
    initData();
    initController();
  }

  initController(){
    _controller.onTapListener((){
      "点击了界面".print;
    });
    _controller.onLongTapListener((){
      "长按了界面".print;
    });
  }


  initData()async{
    listImage.addAll(await TempData.getImageList());
    // _controller.setPictureList(listImage, false);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: null,
      body: Container(),
    );
  }

}



